import request from "@/utils/request";
export function fetchList(params) {
  return request({
    url: "/qsg/device/list",
    method: "get",
    params: params,
  });
}

export function addTask(id) {
  return request({
    url: "/qsg/device/restart/" + id,
    method: "get",
  });
}

export function adminlist(params) {
  return request({
    url: "/qsg/device/adminlist",
    method: "get",
    params: params,
  });
}

export function createDevice(data) {
  return request({
    url: "/qsg/device/create",
    method: "post",
    data: data,
  });
}

export function deleteDevice(id) {
  return request({
    url: "/qsg/device/delete/" + id,
    method: "get",
  });
}

export function getDevice(id) {
  return request({
    url: "/qsg/device/" + id,
    method: "get",
  });
}

export function updateDevice(id, data) {
  return request({
    url: "/qsg/device/update/" + id,
    method: "post",
    data: data,
  });
}

export function setIp(ids,data) {
  return request({
    url: "/qsg/device/set/"+ids,
    method: "post",
    data: data,
  });
}

export function deleteBind(data) {
  return request({
    url: "/qsg/device/deleteBind",
    method: "post",
    data: data,
  });
}
